#!/usr/bin/env bash
set -x
set -o errexit

if which brew; then
  brew install --cask android-commandlinetools
  sudo mkdir /usr/local/android-sdk
  sudo chown "$USER" /usr/local/android-sdk
  sdkmanager --sdk_root=/usr/local/android-sdk \
    "platform-tools" \
    "platforms;android-33" \
    "platforms;android-31" \
    "build-tools;33.0.0" \
    "emulator" \
    "build-tools;30.0.3" \
    "ndk;27.0.12077973" \
    "ndk;24.0.8215888"
else
  echo "home brew not installed, unsupported. Here is a chance to improve the script!"
fi
